package com.westar.tv;

import android.content.pm.ActivityInfo;
import android.os.Bundle;

import com.westar.tv.utils.SharePreferencesUtils;

public class AboutActivity extends ToolBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
    }

    @Override
    protected void onResume() {
        boolean landscape=(Boolean) SharePreferencesUtils.get(this, SPKeys.DEFAULT_SP_FILE_NAME, SPKeys.SETTING_LANDSCAPE, false);
        if(landscape) {
            if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
                setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
            }
        }else{
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
        }
        super.onResume();
    }
}
